// pages/progress/progress.js
Page({
  data: {
      applicationList: []
  },
  onLoad() {
      const userId = 1; // 假设用户 ID 为 1，实际中需要从登录状态获取
      wx.request({
          url: 'http://localhost:8090/xh/jobs/applications/status',
          method: 'GET',
          header: {
              'Content-Type': 'application/json'
          },
          data: {
              userId
          },
          success: (res) => {
              if (res.data.code === 200) {
                  this.setData({
                      applicationList: res.data.data
                  });
              } else {
                  wx.showToast({
                      title: res.data.message,
                      icon: 'none'
                  });
              }
          },
          fail: () => {
              wx.showToast({
                  title: '网络请求失败',
                  icon: 'none'
              });
          }
      });
  }
});